import request from '@/utils/request.js';
import { method } from 'lodash';

export const user = () => {
  return request({
    url: '/pc/User/index',
    method: 'post',
  });
};

// 管理员列表
export const admin = () => {
  return request({
    url: 'pc/admin/query',
    method: 'post',
  });
};

// 管理员编辑
export const admin_edit = (data) => {
  return request({
    url: 'pc/admin/add',
    method: 'post',
    data: data,
  });
};
// 管理员删除
export const delete_admin = (data) => {
  return request({
    url: 'pc/admin/del',
    method: 'post',
    data: data,
  });
};
// 角色列表
export const role = () => {
  return request({
    url: 'pc/Role/index',
    method: 'post',
  });
};
// 菜单列表
export const menu_list = () => {
  return request({
    url: 'pc/menu/index',
    method: 'post',
  });
};
// 角色列表
export const role_list = () => {
  return request({
    url: 'pc/Role/index',
    method: 'post',
  });
};
// 角色列表添加/编辑
export const add_edit = (data) => {
  return request({
    url: 'pc/role/add',
    method: 'post',
    data: data,
  });
};
// 角色列表删除
export const menu_del = (data) => {
  return request({
    url: 'pc/Role/del',
    method: 'post',
    data: data,
  });
};
